package org.jeecg.modules.demo.tobedone.service.impl;

import org.jeecg.modules.demo.tobedone.entity.ReportKpi;
import org.jeecg.modules.demo.tobedone.mapper.ReportKpiMapper;
import org.jeecg.modules.demo.tobedone.service.IReportKpiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 汇报年度关键指标
 * @Author: jeecg-boot
 * @Date:   2025-08-12
 * @Version: V1.0
 */
@Service
public class ReportKpiServiceImpl extends ServiceImpl<ReportKpiMapper, ReportKpi> implements IReportKpiService {

    @Autowired
    private ReportKpiMapper reportKpiMapper;
    //    根据责任部门id查询汇报列表信息
    @Override
    public List<ReportKpi> SelectReportKpiListAll(String orgId) {
        return reportKpiMapper.SelectReportKpiListAll(orgId);
    }
    //    根据年度关键指标的id查询完成情况
    @Override
    public List<String> SelectCompletionProgress(String id) {
        return reportKpiMapper.SelectCompletionProgress(id);
    }
    //    根据待办的id更新已汇报数据的信息到数据库
    @Override
    public int saveReportKpi(ReportKpi reportkpi) {
        return reportKpiMapper.saveReportKpi(reportkpi);
    }
    //    保存汇报记录的信息
    @Override
    public int saveReport(ReportKpi reportkpi) {
        return reportKpiMapper.saveReport(reportkpi);
    }
    //    获取汇报年度关键指标列表的记录
    @Override
    public int ReportSumOfKpi(String orgId) {
        return reportKpiMapper.ReportSumOfKpi(orgId);
    }
}
